package com.feel;

import cn.hutool.crypto.SecureUtil;
import com.feel.mapper.AppointmentMapper;
import com.feel.mapper.ServicePartsMapper;
import com.feel.mapper.UserMapper;
import com.feel.pojo.Appointment;
import com.feel.pojo.ServiceParts;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.List;
import java.util.Map;

/**
 * @Author: 刘永钦
 * @Date: 2024-09-02-20:30
 * @Description:
 */
@SpringBootTest
public class test01 {
    @Autowired
    private UserMapper userMapper;

    @Autowired
    private AppointmentMapper appointmentMapper;
    @Autowired
    private ServicePartsMapper servicePartsMapper;
    @Test
    void test1() {
        //userMapper.getAll().forEach(System.out::println);
    }

    @Test
    void test2() {
        String string = SecureUtil.md5("123");
        System.out.println(string);
    }

    @Test
    void test03() {
        Appointment appointment = new Appointment();
        List<Appointment> list = appointmentMapper.getAll(appointment);
        list.forEach(System.out::println);
    }

    @Test
    void test04() {
        List<ServiceParts> list = servicePartsMapper.getByAppointmentId(3);
        list.forEach(System.out::println);
    }

    @Test
    void test05() {
        List<Map<String, Object>> partsEchartsInfo = servicePartsMapper.getPartsEchartsInfo();
        System.out.println(partsEchartsInfo);
    }
}
